package cn.tedu._03_vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;

import javax.validation.constraints.*;

@Data
public class UserRegParam {
    //@NotNull(message = "用户名不能为null")//不能为空
    @NotEmpty(message = "用户名不能为空字符串和null")
    @ApiModelProperty(value = "用户姓名",required = true)
    private String username;
    //@Size(min = 6,max = 12,message = "密码必须在6-12位之间")
    @Pattern(regexp = "^[A-Za-z0-9+_.-]+@[A-Za-z0-9.-]+$",message = "密码提示")
    //Pattern(regexp = "正则表达式",message = "提示信息")
    @ApiModelProperty(value = "用户密码",required = true)
    private String password;
    @ApiModelProperty(value = "用户邮箱",required = true)
    @Email(message = "邮箱名不合法")
    private String email;
    @ApiModelProperty(value = "用户电话",required = true)
    private String phone;
}
